package me.zhengjie.minbearwcs.entity.DTO.wms.storageUpdate;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import me.zhengjie.minbearwcs.entity.DTO.storage.wms.WmsStorageUpdate;
import me.zhengjie.minbearwcs.entity.DTO.wms.login.MinBearLoginResultDTOContext;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class MinBearStorageUpdateRequestDTO {
    @JsonProperty("ApiType")
    private String ApiType = "InStorageController";

    @JsonProperty("Parameters")
    private List<Map<String, WmsStorageUpdate>> Parameters = new ArrayList<>();

    @JsonProperty("Method")
    private String Method = "UpdatePalletaStorage";

    @JsonProperty("Context")
    private MinBearLoginResultDTOContext Context = new MinBearLoginResultDTOContext();

    public MinBearStorageUpdateRequestDTO(WmsStorageUpdate storageUpdate, String ticket) {
        HashMap<String, WmsStorageUpdate> map1 = new HashMap<>();
        map1.put("Value", storageUpdate);
        Parameters.add(map1);

        Context.setTicket(ticket);
        Context.setInvOrgId(139);
    }


}
